/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main.KBProcess;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
import main.NER.Trie.ContextTrie.ORIENTATION;

/**
 *
 * @author Isaac Osesina
 */
public interface KnowledgeBase extends Cloneable, Serializable {

    void addKBDoc(KnowledgeBaseDocument thisDoc);

    KnowledgeBase clone();

    int countStringOccurence(String string, ORIENTATION orientation);

    StringBuilder getDocTextTagged_BeforeFragment(Fragment fragment);

    /**
     * Returns list of elements in KB
     * @return
     */
    List<Element> getElementList();

    List<Element> getElements_BeforeAfterFragment(Fragment fragment, ORIENTATION orientation);

    /**
     * Returns list of entities in KB
     * @return
     */
    List<Element> getEntityList();

    Fragment getFragment(int fragmentID);

    /**
     * Returns list of fragments in KB
     * @return
     */
    List<Fragment> getFragmentList();

    /**
     * Returns the number of characters contained in KB
     * @return
     */
    int getKBCharCnt();

    /**
     * Returns Document with id i
     * @param i: id of document to be returned
     * returns null if document is not contained in KB
     * @return
     */
    KnowledgeBaseDocument getKBDocID(int i);

    /**
     * Returns all the texts contained in the KB documents
     * @return
     */
    Map<String, StringBuilder> getKBDocTextTagged();

    /**
     * Returns text contained in document with given id
     * @param docID: id of document
     * @return
     */
    StringBuilder getKBDocTextTagged(int docID);

    /**
     * Returns list of Documents contained in KB
     * @return
     */
    List<KnowledgeBaseDocument> getKBDocs();

    /**
     * Returns list of document ids contained in KB
     * @return
     */
    List<Integer> getKBDocsID();

    /**
     * Returns number of documents contained in KB
     * @return
     */
    int getKBSize();

    KnowledgeBaseDocument removeKBDoc(KnowledgeBaseDocument thisDoc);

    KnowledgeBaseDocument removeKBDoc(int thisDocID);

    List<KnowledgeBaseDocument> removeKBDocs(List<KnowledgeBaseDocument> docs);

    void setKBCharCnt(int KBCharCnt);
    
}
